'use strict'
// 引入scp2模块
var client = require('scp2');
var sever_ip  ='/www/wwwroot/www.qdhzmba.net/.nuxt'
var sever_ip2  ='/www/wwwroot/www.qdhzmba.net/'
var random = Math.random()
client.scp('.nuxt/', {
  "host": "39.106.106.86",
  "username": "root",
  "password": "huazhang@123",
  "port": "22",
  "path": sever_ip,
}, function(err) {
  if(!err){
    console.log("npm run build-scp2-test: scp2工具上传完毕,远端服务路径.nuxt文件"+sever_ip)
  }else{
    console.log("失败",err)
  }
});
client.scp('nuxt.config.js', {
  "host": "39.106.106.86",
  "username": "root",
  "password": "huazhang@123",
  "port": "22",
  "path": sever_ip2,
}, function(err) {
  if(!err){
    console.log("npm run build-scp2-test: scp2工具上传完毕,远端服务路径.nuxt.config.js"+sever_ip)
  }else{
    console.log("失败",err)
  }
})
client.scp('package.json', {
  "host": "39.106.106.86",
  "username": "root",
  "password": "huazhang@123",
  "port": "22",
  "path": sever_ip2,
}, function(err) {
  if(!err){
    console.log("npm run build-scp2-test: scp2工具上传完毕,远端服务路径package.json"+sever_ip)
  }else{
    console.log("失败",err)
  }
})
// var sever_ip  ='/www/wwwroot/yihai_electricity_purchase_web/'
// client.scp('./dist/', {
//   "host": "103.120.225.186",
//   "username": "root",
//   "password": "al6GRdtgb2glsk2g",
//   "port": "22",
//   "path": sever_ip,
// }, function(err) {
//   if(!err){
//     console.log("npm run build-scp2-test: scp2工具上传完毕,远端服务路径"+sever_ip)
//   }else{
//     console.log("失败",err)
//   }
// })
